package com.idudiao.sc.common.log.feign;

import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @author songyinyin
 * @since 2019/1/15 14:13
 */
@Component
public class BasicFeignFallbackFactory implements FallbackFactory<BasicFeign> {

    @Override
    public BasicFeign create(Throwable throwable) {
        BasicFeignFallbackFactoryImpl basicFeignFallbackFactory = new BasicFeignFallbackFactoryImpl();
        basicFeignFallbackFactory.setCause(throwable);
        return basicFeignFallbackFactory;
    }
}
